﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WCS.Infrastructure.Dto.Response.Payment
{
    /// <summary>
    /// 用户关联的分账协议 列表项
    /// </summary>
    public class DividedAgreementUserViewDto
    {
        public string Id { get; set; } = null!;
        public string AgreementCode { get; set; } = null!;
        public string? AgreementName { get; set; }
        public string? ParentAgreementId { get; set; }
        public bool IsSubAgreement => !string.IsNullOrEmpty(ParentAgreementId);
        public DateTime CreationTime { get; set; }
        public string? MerchantId { get; set; }
        public int EnableStatus { get; set; }
        public int ActivationStatus { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 关联类型：Participant（参与者）或 Owner（创建者）
        /// 若二者皆是，优先返回 Participant（附带 MyRatio）
        /// </summary>
        public string Relation { get; set; } = "Participant";

        /// <summary>
        /// 若作为参与者，返回该用户在此协议的比例（可能为空）
        /// </summary>
        public decimal? MyRatio { get; set; }
    }
}
